# module add cplex/12.2
# setenv ILOG_LICENSE_FILE /sw/cplex/12.2/access.ilm
INCL   = -I/sw/cplex/12.2/linux/cplex/include/ \
	 -I/sw/local/include
LIBDIR = -L/sw/cplex/12.2/linux/cplex/lib/x86-64_sles10_4.1/static_pic/ \
	 -L/sw/cplex/12.2/linux/cplex/lib/ \
	 -L/local/lib

CCC    = g++
CFLAGS = -Wall


OBJ = main.o master_constraints.o network.o cplexhead.o client.o

main: $(OBJ) 
	$(CCC) $(CFLAGS) $(INCL) -o main $(OBJ) $(LIBDIR) -lcplex -lm -lpthread

main.o: main.cpp master_constraints.h network.h cplexhead.h
	$(CCC) main.cpp $(CFLAGS) $(INCL) -c 

master_constraints.o: master_constraints.cpp master_constraints.h network.h cplexhead.h
	$(CCC) master_constraints.cpp $(CFLAGS) $(INCL) -c 

client.o: client.cpp client.h network.h cplexhead.h
	$(CCC) client.cpp $(CFLAGS) $(INCL) -c 

cplexhead.o: cplexhead.cpp cplexhead.h
	$(CCC) cplexhead.cpp $(CFLAGS) $(INCL) -c

network.o: network.cpp network.h
	$(CCC) network.cpp $(CFLAGS) $(INCL) -c 

